FROM ubuntu:16.04
RUN mkdir /simple-rtmp-server
COPY srs /simple-rtmp-server
RUN apt-get update
RUN apt-get install -y sudo
RUN apt-get install -y gcc
RUN apt-get install -y g++
RUN apt-get install -y make
RUN apt-get install -y patch
RUN apt-get install -y unzip
RUN apt-get install -y libpcre3-dev
RUN apt-get install -y autoconf
RUN apt-get install -y libtool
RUN apt-get install -y python
RUN cd /simple-rtmp-server/trunk && chmod a+x ./configure && sudo ./configure --with-ssl --with-stream-caster --with-ingest --with-ffmpeg --with-transcode --with-hls --with-http-server --with-http-api --with-http-callback --with-nginx --with-dvr --with-stat --with-librtmp && sudo make
COPY nginx.conf /simple-rtmp-server/trunk/objs/nginx/conf/nginx.conf
RUN mkdir -p /simple-rtmp-server/trunk/objs/nginx/conf/conf.d
ADD run.sh /run.sh
RUN chmod +x /run.sh
EXPOSE 80 443 554 1935 8080 8935
VOLUME "/simple-rtmp-server/trunk/conf"
VOLUME "/simple-rtmp-server/trunk/objs/nginx/conf/conf.d"
WORKDIR "/simple-rtmp-server/trunk"
CMD ["/run.sh"]
